#include <stdio.h>
#include <stdlib.h>
int main()
{
	int *array;    // Allocate memory using malloc
	array = (int *)malloc(5 * sizeof(int));
	if (array == NULL)
	{
		printf("Memory allocation failed\n");
		return 1;
	}    // Initialize the array
	for (int i = 0; i < 5; i++)
	{
		array[i] = i;
	}    // Print the array
	for (int i = 0; i < 5; i++)
	{
		printf("%d ", array[i]);
	}
	printf("\n");    // Free the allocated memory
	free(array);
	return 0;
}


